package com.ly.lypopupwindowdemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.ly.lypopupwindowdemo.R;

public class ShapeDemoActivity extends AppCompatActivity {

    Button btn1;
    TextView content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shape_demo);

        btn1 = (Button) findViewById(R.id.btn1);
        content = (TextView) findViewById(R.id.content);

        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                int isV = content.getVisibility();

                if (View.VISIBLE == isV) {
                    content.setVisibility(View.GONE);
                } else {
                    content.setVisibility(View.VISIBLE);
                }

            }
        });


    }
}
